Optimal. Leaf size=140 \[ \frac {b (d \cos (e+f x))^m \, _2F_1\left (1,-\frac {m}{2};1-\frac {m}{2};\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{\left (a^2+b^2\right ) f m}+\frac {F_1\left (\frac {1}{2};1,\frac {2+m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {3596, 3593,
771, 440, 455, 70} \begin {gather*} \frac {\tan (e+f x) \sec ^2(e+f x)^{m/2} (d \cos (e+f x))^m F_1\left (\frac {1}{2};1,\frac {m+2}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right )}{a f}+\frac {b (d \cos (e+f x))^m \, _2F_1\left (1,-\frac {m}{2};1-\frac {m}{2};\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{f m \left (a^2+b^2\right )} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 70
Rule 440
Rule 455
Rule 771
Rule 3593
Rule 3596
Rubi steps
\begin {align*} \int \frac {(d \cos (e+f x))^m}{a+b \tan (e+f x)} \, dx &=\left ((d \cos (e+f x))^m (d \sec (e+f x))^m\right ) \int \frac {(d \sec (e+f x))^{-m}}{a+b \tan (e+f x)} \, dx\\ &=\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{a+x} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \left (\frac {a \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{a^2-x^2}+\frac {x \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{-a^2+x^2}\right ) \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {x \left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{-a^2+x^2} \, dx,x,b \tan (e+f x)\right )}{b f}+\frac {\left (a (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x^2}{b^2}\right )^{-1-\frac {m}{2}}}{a^2-x^2} \, dx,x,b \tan (e+f x)\right )}{b f}\\ &=\frac {F_1\left (\frac {1}{2};1,\frac {2+m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a f}+\frac {\left ((d \cos (e+f x))^m \sec ^2(e+f x)^{m/2}\right ) \text {Subst}\left (\int \frac {\left (1+\frac {x}{b^2}\right )^{-1-\frac {m}{2}}}{-a^2+x} \, dx,x,b^2 \tan ^2(e+f x)\right )}{2 b f}\\ &=\frac {b (d \cos (e+f x))^m \, _2F_1\left (1,-\frac {m}{2};1-\frac {m}{2};\frac {b^2 \sec ^2(e+f x)}{a^2+b^2}\right )}{\left (a^2+b^2\right ) f m}+\frac {F_1\left (\frac {1}{2};1,\frac {2+m}{2};\frac {3}{2};\frac {b^2 \tan ^2(e+f x)}{a^2},-\tan ^2(e+f x)\right ) (d \cos (e+f x))^m \sec ^2(e+f x)^{m/2} \tan (e+f x)}{a f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 13.97, size = 1132, normalized size = 8.09 \begin {gather*} \frac {(d \cos (e+f x))^m \left (b \left (-1+\sec ^2(e+f x)^{-m/2}\right )+a m \, _2F_1\left (\frac {1}{2},1+\frac {m}{2};\frac {3}{2};-\tan ^2(e+f x)\right ) \tan (e+f x)-b F_1\left (m;\frac {m}{2},\frac {m}{2};1+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2}\right )}{f (a+b \tan (e+f x)) \left (a m \, _2F_1\left (\frac {1}{2},1+\frac {m}{2};\frac {3}{2};-\tan ^2(e+f x)\right ) \sec ^2(e+f x)-b m \sec ^2(e+f x)^{-m/2} \tan (e+f x)+b m F_1\left (m;\frac {m}{2},\frac {m}{2};1+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \tan (e+f x) \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2}-b \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (-\frac {(a-i b) b m^2 F_1\left (1+m;1+\frac {m}{2},\frac {m}{2};2+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1+m) (a+b \tan (e+f x))^2}-\frac {(a+i b) b m^2 F_1\left (1+m;\frac {m}{2},1+\frac {m}{2};2+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)}{2 (1+m) (a+b \tan (e+f x))^2}\right )-\frac {1}{2} b m F_1\left (m;\frac {m}{2},\frac {m}{2};1+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1+\frac {m}{2}} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (-\frac {b^2 \sec ^2(e+f x) (-i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )-\frac {1}{2} b m F_1\left (m;\frac {m}{2},\frac {m}{2};1+m;\frac {a-i b}{a+b \tan (e+f x)},\frac {a+i b}{a+b \tan (e+f x)}\right ) \sec ^2(e+f x)^{-m/2} \left (\frac {b (-i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{m/2} \left (\frac {b (i+\tan (e+f x))}{a+b \tan (e+f x)}\right )^{-1+\frac {m}{2}} \left (-\frac {b^2 \sec ^2(e+f x) (i+\tan (e+f x))}{(a+b \tan (e+f x))^2}+\frac {b \sec ^2(e+f x)}{a+b \tan (e+f x)}\right )+a m \sec ^2(e+f x) \left (-\, _2F_1\left (\frac {1}{2},1+\frac {m}{2};\frac {3}{2};-\tan ^2(e+f x)\right )+\left (1+\tan ^2(e+f x)\right )^{-1-\frac {m}{2}}\right )\right )} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.99, size = 0, normalized size = 0.00 \[\int \frac {\left (d \cos \left (f x +e \right )\right )^{m}}{a +b \tan \left (f x +e \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (d \cos {\left (e + f x \right )}\right )^{m}}{a + b \tan {\left (e + f x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\left (d\,\cos \left (e+f\,x\right )\right )}^m}{a+b\,\mathrm {tan}\left (e+f\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________